package com.advaita.license;

import javax.swing.JPanel;

import java.awt.Color;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JButton;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.beans.PropertyChangeSupport;

public class TestPanel2 extends JPanel implements ActionListener {
	private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
	private final MainFrame Parent;

	/**
	 * Create the panel.
	 */
	public TestPanel2(MainFrame parent) {
		setBackground(Color.GREEN);
		setLayout(null);
		this.Parent = parent;

		JLabel lblThisIsA = new JLabel("This is a label on the 2nd test panel");
		lblThisIsA.setBounds(10, 11, 190, 38);
		add(lblThisIsA);

		JButton btnClick = new JButton("Click");
		btnClick.addActionListener(this);
		btnClick.setBounds(65, 78, 89, 23);
		add(btnClick);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		this.Parent.ButtonClicked("Panel Click");
	}
}